﻿var zqnb = zqnb || {};

(function () {
    'use strict';
    
    //路由相关
    var makeUrl = function MakeUrl(area, controller, action, queryString) {

        if (!queryString) {

            return "/" + area + "/" + controller + "/" + action;
        }

        var fdStart = queryString.indexOf("?");
        if (fdStart == 0) {

            return "/" + area + "/" + controller + "/" + action + "?" + queryString;
        }

        return "/" + area + "/" + controller + "/" + action + queryString;
    };
    zqnb.route = {
        makeUrl: makeUrl
    };

    //设置默认焦点
    var setFocus = function SetFocus(elementId){

        document.onkeydown = function (event_e) {
            if (window.event) event_e = window.event;
            var int_keycode = event_e.charCode || event_e.keyCode;
            if (int_keycode == '13') {

                document.getElementById(elementId).focus();;
            }
        };

    };
    zqnb.utils = {
        setFocus: setFocus
    };



    //var aceSetting = {
    //    skin: '.no-skin',
    //    fixedNavbar: true,
    //    fixedSidebar: true,
    //    compactSidebar: true,
    //    submenuOnHover: true,
    //    fixedBreadcrumbs: true,
    //    insideContainer: true,

    //    applySkin : function() {

    //    }

    //};

}());